home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / Libraries / Blitting Class Library / Secure Macintosh Ports / SecureCGrafPort.h < prev    next >
Encoding:
Text File  |  1995-10-20  |  872 b   |  36 lines  |  [TEXT/CWIE]

  1. // SecureCGrafPort.h, the SecureCGrafPort class, useful for generating onscreen
  2. //    CGrafPorts for those who do not use a framework to make CGrafPorts for them.
  3.  
  4. // copyright © 1995, Macneil Shonle. All rights reserved.
  5.  
  6. #ifndef __SECURECGRAFPORT__
  7. #define __SECURECGRAFPORT__
  8.  
  9. #ifndef __SECUREMACPORT__
  10. #include <SecureMacPort.h>
  11. #endif
  12.  
  13. #include <exception>
  14. #include <new>
  15.  
  16.         // class SecureCGrafPort
  17. class SecureCGrafPort : public SecureMacPort {
  18. public:
  19.     SecureCGrafPort(const Rect&) throw(xalloc, invalidargument);
  20.     virtual ~SecureCGrafPort();
  21.     
  22.     Rect& portRect() const;
  23.     BitMapPtr bitMap() const;
  24.     short width() const;
  25.     short height() const;
  26.     CGrafPtr getMacPort() const;
  27.     GDHandle getMacGD() const;
  28.     virtual operator CGrafPtr() const;
  29.  
  30. private:
  31.     CGrafPtr port;
  32.     SecureCGrafPort(const SecureCGrafPort&);
  33.     SecureCGrafPort& operator=(const SecureCGrafPort&);
  34. };
  35.  
  36. #endif